<h1 class="page-title"> <i class="icon-list font-green-sharp"></i> {{appServ.pageTitle}} </h1>
<div class="toolbar">
    <div class="page-bar">
        <ul class="page-breadcrumb float-right">
            <li>
                <i class="fa fa-home"></i>
                <a href="#/home.html">管理中心</a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="javascript:;">{{appServ.pageTitle}}</a>
            </li>
        </ul>
        <a [routerLink]="['/index/adsEdit']" class="btn blue"> <i class="fa fa-plus"></i> 添加</a>
        <button (click)="itemDelete()" class="btn btn-danger"> <i class="fa fa-trash-o"></i> 删除</button>
    </div>
</div>
<div class="datalist" *ngIf="dataList.length>0">
    <table class="table table-striped table-bordered table-advance table-hover">
        <thead>
            <tr>
                <th class="text-center">
                    <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline"><input name="btSelectAll" (change)="changeAll($event)" type="checkbox"><span></span></label> </th>
                <th class="hidden-xs"> 标题 </th>
                <th> Url </th>
                <th> 状态 </th>
                <th> 操作</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let item of dataList">
                <td class="highlight text-center">
                    <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline"><input type="checkbox" [(ngModel)]="item.checked"  /><span></span></label>
                </td>
                <td> {{item.Title}} </td>
                <td> {{item.Url}} </td>
                <td> {{item.Status}} </td>
                <td class="text-center">
                    <a [routerLink]="['/index/adsEdit']" [queryParams]="{ id: item.Id }" class="btn green">修改</a>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="col align-self-center">
            <div class="dataTables_info">
                <span>第 {{pdata.pagenum}} 页 / 共 {{pdata.totalPage}} 页</span>
                <span>共 {{pdata.count}} 条</span>
            </div>
        </div>
        <div class="col">
            <ngb-pagination class="float-right" (pageChange)="pageChange($event)" [collectionSize]="pdata.count" [(page)]="pdata.pagenum" [maxSize]="pdata.maxSize"></ngb-pagination>
        </div>
    </div>
</div>
<div class="nodata" *ngIf="dataList.length==0">
    <div class="alert alert-info">
        <i class="fa fa-info-circle fa-fw fa-2x"></i> 没有{{appServ.pageTitle}}数据
    </div>
</div>